<div id="global" class="search">
{$oZoneHeader}
<div id="main"> {$oZoneBreadCrumb}
  <div id="leftContent2">
    <div id="essai_fiche">
    <input type='hidden' id='pathIllus' value="" />
      {if sizeof($photo)}
          {foreach $photo as $itemPhoto}
              <input type='hidden' class="photo_illus" value="{$itemPhoto}" />
          {/foreach}
       {/if}
      <h2>{$chapitre->chap_name}</h2>
      <div class="wrap">
        <div class="info2">
          <div class="chapitre essai_chapitre">
              <span class="chap_content">{$chapitre->chap_content}</span>
          </div>
          <div class="more_link relative" style="margin-top:11px;">
                {if $navigation->precMod} <a  href="{jurl 'essais~FoDossier:chapitre',array('chap'=>$navigation->prec, 'dossId'=>$currentDoss)}">&lt;&lt; {$navigation->precMod}</a> |
                {/if} 
                 <a href="{jurl  'essais~FoDossier:index', array('id'=>$currentDoss)}">Sommaire</a> |
                
                {if $navigation->suivMod} <a   href="{jurl 'essais~FoDossier:chapitre',array('chap'=>$navigation->suiv, 'dossId'=>$currentDoss)}">{$navigation->suivMod} &gt;&gt;</a> {/if}
            </div>
        </div>
        <div class="deco">&nbsp;</div>
      </div>
    </div>
  </div>
  {$oZoneRightContent}
    <div class="clear">&nbsp;</div>
  </div>
  <div id="SideBar"><a href="#global"><img alt="" src="{$j_basepath}design/front/images/top.png" title="" /></a></div>
</div>
{$oZoneFooter}
{$oZonePubHidden}


{literal}
<script type="text/javascript">

        var content = $('.chap_content').html();
        var pathIllus = $('#pathIllus').val();
        var tabImg = new Array();
        var i = 0;var imageExiste = 0;
        $('.photo_illus').each(function(){
                tabImg[i] = '<img src="'+$(this).val()+'" ';
                if((i%2) == 0) tabImg[i] += ' class="gauche" width="250">';
                else tabImg[i] += ' class="droite"  width="250">';
                i++;
                imageExiste = 1;
        });
        if(imageExiste == 1){
            var nbMots =  parseInt(content.length / tabImg.length);
            var init = 0;var newContent = '';
            for(j=0;j<tabImg.length;j++){
                newContent += tabImg[j] + '' + content.substr(init,nbMots);
                init += nbMots;
            }
            $('.chap_content').html(newContent);
        }
        
</script>
{/literal}